package com.cym.controller;

import com.cym.dto.BookParam;
import com.cym.entity.Book;
import com.cym.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/book")
public class BookController {

    @Autowired
    BookService bookService;
    //获取书籍列表
    @RequestMapping("/getBookList")
    public List<Book> getBookList(@RequestBody BookParam bookParam){
        return bookService.getList(bookParam);
    }
}
